package cn.thornbird.orgsync.repository;

import cn.thornbird.orgsync.entity.Certificate;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CertificateRepository extends BaseRepository<Certificate>, JpaRepository<Certificate, String> {

    Certificate findFirstByUserIdAndCompanyId(String userId, String companyId);

    List<Certificate> findAllByUserIdOrderByCreatedAt(String userId);

}
